package com.cskaoyan.controller.wx;

import com.cskaoyan.model.admin.bo.BaseParam;
import com.cskaoyan.model.admin.vo.BaseRespVo;
import com.cskaoyan.model.vx.vo.WxGoodsListVo;
import com.cskaoyan.service.wx.WxGoodsByHanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * @author hanshuai
 * @version 1.0
 * @description @TODO
 * @date 2021/12/2 21:31
 */

@RestController
@RequestMapping("wx/goods")
public class WxGoodsByHanController {

    @Autowired
    WxGoodsByHanService wxGoodsByHanService;

    @RequestMapping("/list")
    public BaseRespVo goodsList(BaseParam baseParam, String keyword, Integer categoryId, HttpSession httpSession){
       WxGoodsListVo wxGoodsListVo = wxGoodsByHanService.goodsList(baseParam,keyword,categoryId,httpSession);
       return BaseRespVo.ok(wxGoodsListVo);
    }
}
